/**
 * Created by apple on 2017/6/25.
 */
import React, {Component} from "react";
import {
  Text,
  View,
  StyleSheet,
  TouchableOpacity,
  Image,
} from "react-native";
import NavigationBar from './common/NaviagtionBar'
export default class Girl extends Component{
  constructor(props){
    super(props);
    this.state={

    }
  }

  renderButton(image){
    return (
      <TouchableOpacity
        onPress={()=>{this.props.navigator.pop()}}
      >
        <Image style={{width:22,height:22,margin:15}} source={image}></Image>
      </TouchableOpacity>
    )
  }
  render(){
    return (
      <View style={styles.container}>
        <NavigationBar
          title={"Girl2"}
          style={{
            backgroundColor:"#ee6363"
          }}
          leftButton={
           this.renderButton(require("../res/images/ic_arrow_back_white_36pt.png"))
          }
          rightButton={
            this.renderButton(require("../res/images/ic_star.png"))
          }
          statusBar={{barStyle:'dark-content'}}
        />
        <Text
          style={styles.text}
        >
          i am girl
        </Text>
        <Text style = {styles.text}>
          我收到了男送的: {this.props.word}
        </Text>
        <Text
          style = {styles.text}
          onPress = {() =>{
            this.props.onCallBack("巧克力")
            this.props.navigator.pop()
          }}
        >
          回赠巧克力
        </Text>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  container:{
    flex:1,
    backgroundColor:"#fff"
  },
  text:{
    fontSize:20,
    color:"#000"
  }
});


